﻿using System;
using System.Collections.Generic;
using Assets.Scripts.GtsScripts;
using MoonSharp.Interpreter;

namespace Lua
{
	// Token: 0x02000302 RID: 770
	[MoonSharpUserData]
	public class AllGiantess
	{
		// Token: 0x0600137B RID: 4987 RVA: 0x00082B6C File Offset: 0x00080D6C
		[MoonSharpHidden]
		public AllGiantess()
		{
			this.instances = new Dictionary<int, Entity>();
			this.instances.Clear();
			ObjectManager.Instance.OnGiantessAdd += this.AddGTS;
			ObjectManager.Instance.OnGiantessRemove += this.RemoveGTS;
		}

		// Token: 0x17000311 RID: 785
		// (get) Token: 0x0600137C RID: 4988 RVA: 0x00082BC1 File Offset: 0x00080DC1
		// (set) Token: 0x0600137D RID: 4989 RVA: 0x00082BC8 File Offset: 0x00080DC8
		public float globalSpeed
		{
			get
			{
				return GameController.globalSpeed;
			}
			set
			{
				GameController.globalSpeed = value;
			}
		}

		// Token: 0x17000312 RID: 786
		// (get) Token: 0x0600137E RID: 4990 RVA: 0x00082BD0 File Offset: 0x00080DD0
		// (set) Token: 0x0600137F RID: 4991 RVA: 0x00082BD7 File Offset: 0x00080DD7
		public float maxSize
		{
			get
			{
				return Giantess.MaxScale;
			}
			set
			{
				Giantess.MaxScale = value;
			}
		}

		// Token: 0x17000313 RID: 787
		// (get) Token: 0x06001380 RID: 4992 RVA: 0x00082BDF File Offset: 0x00080DDF
		// (set) Token: 0x06001381 RID: 4993 RVA: 0x00082BE6 File Offset: 0x00080DE6
		public float minSize
		{
			get
			{
				return Giantess.MinScale;
			}
			set
			{
				Giantess.MinScale = value;
			}
		}

		// Token: 0x17000314 RID: 788
		// (get) Token: 0x06001382 RID: 4994 RVA: 0x00082BEE File Offset: 0x00080DEE
		public IDictionary<int, Entity> list
		{
			get
			{
				return this.instances;
			}
		}

		// Token: 0x06001383 RID: 4995 RVA: 0x00082BF8 File Offset: 0x00080DF8
		private void AddGTS(int id)
		{
			Giantess giantess;
			if (ObjectManager.Instance.giantessList.TryGetValue(id, out giantess))
			{
				Entity luaEntity = giantess.GetLuaEntity();
				this.instances[id] = luaEntity;
			}
		}

		// Token: 0x06001384 RID: 4996 RVA: 0x00082C30 File Offset: 0x00080E30
		private void RemoveGTS(int id)
		{
			this.instances.Remove(id);
		}

		// Token: 0x040016DC RID: 5852
		private Dictionary<int, Entity> instances;
	}
}
